{include file="public/meat" title="订单列表"/}
{load href="__ADMIN__/css/order.css" /}
<div class="layout cx-fex-c mt-20 b-b pad-b10">
    <div class="xl11 cx-fex-l">
    <a class="button {neq name='$Request.action' value='index'}bg-blue{/neq} mr-10" href="{:url('index')}">订单速览</a>
    <a class="button {neq name='$Request.action' value='allindex'}bg-blue{/neq} mr-10" href="{:url('allindex')}">全部订单列表</a>
    <a class="button {neq name='$Request.action' value='shopindex'}bg-blue{/neq} mr-10" href="{:url('shopindex')}">产品订单列表</a>
    <a class="button {neq name='$Request.action' value='tuanindex'}bg-blue{/neq}" href="{:url('tuanindex')}">拼团订单列表</a>
    </div>
</div>
<div class="layout mt-15 cx-fex-c">
    <div class="xl11 order-ul-t cx-fex">
        <h3 class="order-title">订单速览</h3>
    </div>
    <div class="xl11 oreder-cont">
        <div class="layout cx-fex oreder-top" style="border-bottom: 1px dotted #dfdfdf;">
            <a class="xs3 fex-column oreder-k" href="{:url('solist',array('app'=>1,'mid'=>100,'playstatus'=>'all'))}">
                <h3 class="t-c">{$order.jinnum}</h3>
                <h6 class="t-c">今日订单量</h6>
            </a>
            <a class="xs3 fex-column oreder-k" href="{:url('solist',array('app'=>2,'mid'=>100,'playstatus'=>'all'))}">
                <h3 class="t-c">{$order.zuonum}</h3>
                <h6 class="t-c">昨日订单量</h6>
            </a>
            <a class="xs3 fex-column oreder-k" href="{:url('solist',array('app'=>3,'mid'=>101,'playstatus'=>'all'))}">
                <h3 class="t-c">{$order.ztuannum}</h3>
                <h6 class="t-c">今日正常团</h6>
            </a>
            <a class="xs3 fex-column oreder-k" href="{:url('solist',array('app'=>4,'mid'=>101,'playstatus'=>'all'))}">
                <h3 class="t-c">{$order.ltuannum}</h3>
                <h6 class="t-c">今日0元团</h6>
            </a>
        </div>
        <div class="layout cx-fex oreder-top" style="border-bottom: 1px dotted #dfdfdf;">
            <div class="xs3 fex-column oreder-k">
                <h3 class="t-c">{:number_format($order['zuomon'] / 100,'2')} <small class="t-14 t-gray">元</small></h3>
                <h6 class="t-c">昨日收入</h6>
            </div>
            <div class="xs3 fex-column oreder-k">
                <h3 class="t-c">{:number_format($order['swmon'] / 100,'2')} <small class="t-14 t-gray">元</small></h3>
                <h6 class="t-c">近3日收入</h6>
            </div>
            <div class="xs3 fex-column oreder-k">
                <h3 class="t-c">{:number_format($order['zhoumon'] / 100,'2')} <small class="t-14 t-gray">元</small></h3>
                <h6 class="t-c">近7日收入</h6>
            </div>
            <div class="xs3 fex-column oreder-k">
                <h3 class="t-c">{:number_format($order['yuemon'] / 100,'2')} <small class="t-14 t-gray">元</small></h3>
                <h6 class="t-c">近30日收入</h6>
            </div>
        </div>
        <div class="layout cx-fex oreder-top">
            <a class="xs3 fex-column oreder-k" href="{:url('solist',array('playstatus'=>0))}">
                <h3 class="t-c">{$order.playstatus0}</h3>
                <h6 class="t-c">未付款订单</h6>
            </a>
            <a class="xs3 fex-column oreder-k" href="{:url('solist',array('playstatus'=>1))}">
                <h3 class="t-c">{$order.playstatus1}</h3>
                <h6 class="t-c">待发货订单</h6>
            </a>
            <a class="xs3 fex-column oreder-k" href="{:url('solist',array('playstatus'=>2))}">
                <h3 class="t-c">{$order.playstatus2}</h3>
                <h6 class="t-c">待收货订单</h6>
            </a>
            <a class="xs3 fex-column oreder-k" href="{:url('solist',array('playstatus'=>6))}">
                <h3 class="t-c">{$order.playstatus6}</h3>
                <h6 class="t-c">申请退款订单</h6>
            </a>
        </div>
    </div>
</div>
<div class="layout cx-fex-c mt-20">
    <div class="xl11 order-ul-t cx-fex">
        <h3 class="order-title">最新订单</h3>
        <a href="{:url('allindex')}">更多>></a>
    </div>
    <ul class="xl11 fex-column">
        {volist name="order.orderlist" id="cx" empty=""}
            <li class="layout cx-fex-c fex-items-c fex-column order-li">
                <div class="layout cx-fex order-li-top">
                    <div>订单号：{$cx.oid}</div>
                    <div>下单时间：{$cx.addtime|date="Y-m-d h:i:d",###}</div>
                </div>
                <div class="xl11 cx-fex-l order-li-cont">
                {eq name="cx.mid" value="100"}
                    <div class="xl8 cx-fex-c fex-column order-li-contl">
                        {volist name="cx.conf.shop" id="c" empty="" key="k"}
                        <div class="layout cx-fex-l order-li-contcp">
                            <div class="order-li-img">
                                <img class="img-responsive" src="{$c.picurl}" alt="{$c.title}" >
                            </div>
                            <div class="xl9 pad-l10 cx-fex fex-column">
                                <h3 class="or-title t-14">{$c.title}</h3>
                                <div class="layout cx-fex-l">
                                    数量: {$c.num}
                                </div>
                            </div>
                        </div>
                        {/volist}
                    </div>
                    <ul class="xl4 cx-fex-c fex-items-c fex-column">
                        <li><span class="mr-5 t-gray">金额:</span><span class="t-red t-16">{:number_format($cx['allmoney'] / 100,'2')}</span></li>
                        <li class="mt-10">
                            <a class="order-li-contan button button-S bg-blue" href="{:url('edit',array('oid'=>$cx.oid))}">
                                {switch name="$cx.playstatus" }{case value="1"} 去发货 {/case} {case value="2"} 等待收货 {/case} {case value="3"} 已退款 {/case}{case value="5"} 已收货 {/case} {case value="6"} 申请退款 {/case} {default /} {gt name="$thistime-$cx['addtime']" value="26400"} 订单已关闭 {else /} 待付款 {/gt} {/switch}
                            </a>
                            {switch name="$cx.playstatus" }
                            {case value="6"} <a class="order-li-contan button button-S bg-blue" href="{:url('edit',array('oid'=>$cx.oid))}">处理退款</a> {/case}
                            {case value="0"} {case value="0|4"} {gt name="$thistime-$cx.addtime" value="26400"} <a class="button button-S bg-red cx-click" data-id="{$cx.oid}" data-href="{:url('del')}" data-type="deldata">删除订单</i></a> {else /} <a class="order-li-contan button button-S bg-blue" href="{:url('edit',array('oid'=>$cx.oid))}">修改价格</a> {/gt}{/case}
                            {/switch}
                        </li>
                    </ul>
                {else /}
                    <div class="xl4 cx-fex-l fex-items-c">
                        <div class="layout order-li-img">
                            <img class="img-responsive" src="{$cx.conf.picurl}" alt="{$cx.title}" >
                        </div>
                        <h3 class="or-title t-14 pad-l10">{$cx.title}</h3>
                    </div>
                    <div class="xl8">
                        <div class="layout cx-fex-l order-li-contcp">
                            <div class="xl8 pad-l10 cx-fex fex-column">
                                <h3 class="or-title t-14"><span class="t-gray">微信昵称: </span>{$cx.conf.nickname}</h3>
                                <ul class="layout cx-fex-l fex-column">
                                    <li><span class="t-gray">姓名: </span> {$cx.conf.adduname}</li>
                                    <li><span class="t-gray">手机: </span> {$cx.conf.phone}</li>
                                    <li class="cx-fex-l cx-fex-nowrap">
                                        <span class="t-gray" style="min-width: 40px">地址: </span>
                                        <div class="">{$cx.conf.addres}</div>
                                    </li>
                                </ul>
                            </div>
                            <ul class="xl4 cx-fex-c fex-items-c fex-column">
                                <li><span class="mr-5 t-gray">金额:</span><span class="t-red t-16">{:number_format($cx['allmoney'] / 100,'2')}</span></li>
                                <li class="mt-10">
                                    <a class="order-li-contan button button-S bg-blue" href="{:url('edit',array('oid'=>$cx.oid))}">
                                        {switch name="$cx.playstatus" }{case value="1"} 去发货 {/case} {case value="2"} 等待收货 {/case} {case value="3"} 已退款 {/case} {case value="5"} 已收货 {/case} {case value="6"} 申请退款 {/case} {default /} {gt name="$thistime-$cx.addtime" value="26400"} 订单已关闭 {else /} 待付款 {/gt} {/switch}
                                    </a>
                                    {switch name="$cx.playstatus" }
                                    {case value="6"} <a class="order-li-contan button button-S bg-blue ml-5" href="{:url('edit',array('oid'=>$cx.oid))}">处理退款</a> {/case}
                                    {case value="0|4"} {gt name="$thistime-$cx.addtime" value="26400"}  <a class="button button-S bg-red cx-click" data-id="{$cx.oid}" data-href="{:url('del')}" data-type="deldata">删除订单</i></a>{else /} <a class="order-li-contan button button-S bg-blue ml-5" href="{:url('edit',array('oid'=>$cx.oid))}">修改价格</a> {/gt}{/case}
                                    {/switch}
                                </li>
                            </ul>
                        </div>
                        {volist name="cx.fudata" id="c" empty="" key="k"}
                        <div class="layout cx-fex-l order-li-contcp">
                            <div class="xl8 pad-l10 cx-fex fex-column">
                                <h3 class="or-title t-14"><span class="t-gray">微信昵称: </span>{$c.conf.nickname}</h3>
                                <ul class="layout cx-fex-l fex-column">
                                    <li><span class="t-gray">姓名: </span> {$c.conf.adduname}</li>
                                    <li><span class="t-gray">手机: </span> {$c.conf.phone}</li>
                                    <li class="cx-fex-l cx-fex-nowrap">
                                        <span class="t-gray" style="min-width: 40px">地址: </span>
                                        <div class="">{$c.conf.addres}</div>
                                    </li>
                                </ul>
                            </div>
                            <ul class="xl4 cx-fex-c fex-items-c fex-column">
                                <li><span class="mr-5 t-gray">金额:</span><span class="t-red t-16">{:number_format($c['allmoney'] / 100,'2')}</span></li>
                                <li class="mt-10">
                                <a class="order-li-contan button button-S bg-blue" href="{:url('edit',array('oid'=>$c.oid))}">
                                    {switch name="$c.playstatus" }{case value="1"} 去发货 {/case} {case value="2"} 等待收货 {/case} {case value="3"} 已退款 {/case} {case value="5"} 已收货 {/case} {case value="6"} 申请退款 {/case} {default /} {gt name="$thistime-$c.addtime" value="26400"} 订单已关闭 {else /} 待付款 {/gt} {/switch}
                                </a>
                                {switch name="$c.playstatus" }
                                {case value="6"} <a class="order-li-contan button button-S bg-blue ml-5" href="{:url('edit',array('oid'=>$c.oid))}">处理退款</a> {/case}
                                {case value="0|4"} {gt name="$thistime-$c.addtime" value="26400"}  <a class="button button-S bg-red cx-click" data-id="{$c.oid}" data-href="{:url('del')}" data-type="deldata">删除订单</i></a> {else /} <a class="order-li-contan button button-S bg-blue ml-5" href="{:url('edit',array('oid'=>$c.oid))}">修改价格</a> {/gt}{/case}
                                {/switch}
                                </li>
                            </ul>
                        </div>
                        {/volist}
                    </div>
                {/eq}
                </div>
            </li>
        {/volist}
    </ul>
    <div class="layout mt-20 cx-fex-c">
        <a class="button bg-blue" href="{:url('allindex')}">查看全部订单</a>
    </div>
</div>
{include file="public/js" /}
<div class="layout mt-20 cx-fex-c">
</div>
<script>
    layui.config({
        base: '__ADMIN__/js/'
    }).use('app');
</script>
{include file="order/foot" /}
{include file="public/footer" /}